package com.pdg.mcplugin.ranger.conversations;

import org.bukkit.conversations.ConversationContext;
import org.bukkit.conversations.Prompt;

import com.pdg.mcplugin.common.baseclasses.MessagePromptBase;
import com.pdg.mcplugin.ranger.Ranger;

public class RenamePromptConflict extends MessagePromptBase<Ranger> {

	private static final String RENAME_CONFLICT = "There is already a place named '%s'.";

	public RenamePromptConflict(Ranger thePlugin) {
		super(thePlugin);
	}

	@Override
	public String getPromptText(ConversationContext theContext) {
		Object theNewName = (String)theContext.getSessionData(RenamePrompt.KEY_NEWNAME);
		return String.format(RENAME_CONFLICT,theNewName);
	}

	@Override
	protected Prompt getNextPrompt(ConversationContext theContext) {
		return new RenamePrompt(getPlugin());
	}
}
